package com.thunisoft.com;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Execute {

    private final Map<String, Po> result = new HashMap<>();

    public static void main(String[] args) {
        List<String> rights = Arrays.asList("step2");
        Execute e = new Execute();
        e.doAll(rights);
    }

    public void doAll(List<String> rights) {
        for (String right : rights) {
            StepType stepType = StepType.getInstance(right);
            result.put(stepType.getName(),stepType.execute(new Execute()));
        }
        System.out.println(result);
    }

    public Po1 step1(){
        return new Po1("Zhang San","大一");
    }

    public Po2 step2(){
        return new Po2("Li Si","大二",21);
    }

    public Po3 step3(){
        return new Po3("Wang Wu",30);
    }
}
